﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Diagnostics;
using ZoneFiveSoftware.Common.Visuals;
using ZoneFiveSoftware.SportTracks.UI.Forms;
using ZoneFiveSoftware.Common.Data.Fitness;

using ZoneFiveSoftware.Common.Visuals.Chart;
using ZoneFiveSoftware.Common.Visuals.Fitness;
using BENBUN.Properties;
using BENBUN;
using BENBUN.Utils;
using BENBUN.WIW;

namespace BENBUN.Views
{
    internal class SettingsAction : IAction, INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private IApplication application;

        public void Refresh()
        { }

        public void Run(Rectangle rectButton)
        {
            this.PropertyChanged.GetType();
            application = Plugin.GetApplication();
            application.ShowView(GUIDStore.SettingsView, "PageId=" + GUIDStore.WIWSettings.ToString());
        }

        public bool Enabled
        { get { return true; } }

        public bool HasMenuArrow
        { get { return true; } }

        public System.Drawing.Image Image
        { get { return CommonResources.Images.Settings16; } }

        public string Title
        { get { return Resources.SettingsText; } }
    }

    internal class HelpAction : IAction, INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        public void Refresh()
        { }

        public void Run(Rectangle rectButton)
        {
            this.PropertyChanged.GetType();
            string gourl = Resources.BENBUNURL + Resources.LinkHelpURL + GetType().Assembly.GetName().Version.ToString(3);
            Process.Start(gourl);
        }

        public bool Enabled
        { get { return true; } }

        public bool HasMenuArrow
        { get { return true; } }

        public System.Drawing.Image Image
        { get { return CommonResources.Images.Information16; } }

        public string Title
        { get { return Resources.LinkHelpText; } }
    }

    internal class DonateAction : IAction, INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        public void Refresh()
        { }

        public void Run(Rectangle rectButton)
        {
            this.PropertyChanged.GetType();
            Process.Start(Resources.LinkDonateURL);
        }

        public bool Enabled
        { get { return true; } }

        public bool HasMenuArrow
        { get { return true; } }

        public System.Drawing.Image Image
        { get { return Resources.donate; } }

        public string Title
        { get { return Resources.LinkDonateText; } }
    }

    internal class BENBUNWebAction : IAction, INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        public void Refresh()
        { }

        public void Run(Rectangle rectButton)
        {
            this.PropertyChanged.GetType();
            string gourl = Resources.BENBUNURL + Resources.LinkWebURL + GetType().Assembly.GetName().Version.ToString(3);
            Process.Start(gourl);
        }

        public bool Enabled
        { get { return true; } }

        public bool HasMenuArrow
        { get { return true; } }

        public System.Drawing.Image Image
        { get { return Resources.webhome; } }

        public string Title
        { get { return Resources.LinkWebText; } }
    }
}

